package com.qaml.mes.device.domain.convert;

import com.qaml.mes.device.dao.CheckUpkeepInfoDO;
import com.qaml.mes.device.dto.eqp.CheckUpkeepInfoDTO;
import com.qaml.mes.device.vo.eqp.CheckUpkeepInfoVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Filename：CheckUpkeepInfoConvert
 * @Author：zhangzhifeng
 * @Project：mes-device
 * @Date：2024/3/1 13:38
 */
@Mapper
public interface CheckUpkeepInfoConvert {

    CheckUpkeepInfoConvert INSTANCE = Mappers.getMapper(CheckUpkeepInfoConvert.class);

    /**
     * 将检保信息DTO转DO
     *
     * @param checkUpkeepInfoDTO
     * @return
     */
    CheckUpkeepInfoDO saveDTO(CheckUpkeepInfoDTO checkUpkeepInfoDTO);

    /**
     * DO -->VO
     *
     * @param checkUpkeepInfoDO
     * @return
     */
    CheckUpkeepInfoVO do2VO(CheckUpkeepInfoDO checkUpkeepInfoDO);

    /**
     * 批量的 DO -->VO
     *
     * @param records
     * @return
     */
    List<CheckUpkeepInfoVO> dos2VOS(List<CheckUpkeepInfoDO> records);
}